-- GENERATED SPELL FOR [Thane Torvald Eriksson] --


function spell0_27377(pUnit, Event) --@Arcane Shot,n/a--
pUnit:FullCastSpellOnTarget(34829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27377', 0, 1)
end

function spell1_27377(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(52813,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27377', 592, 1)
end

function spell2_27377(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(50512,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27377', 577, 1)
end

function spell3_27377(pUnit, Event) --@Torvald\'s Deterrence,Self--
pUnit:FullCastSpellOnTarget(57057,pUnit)
pUnit:RegisterEvent('Sorts_27377', 10281, 1)
end

function spell4_27377(pUnit, Event) --@Volley,n/a--
pUnit:FullCastSpellOnTarget(56843,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27377', 6000, 1)
end

function Sorts_27377(pUnit, Event)
local choix_sorts_27377 = math.random(0, 4)
if choix_sorts_27377 == 0 then
pUnit:RegisterEvent('spell0_27377', 1, 1)
end
if choix_sorts_27377 == 1 then
pUnit:RegisterEvent('spell1_27377', 1, 1)
end
if choix_sorts_27377 == 2 then
pUnit:RegisterEvent('spell2_27377', 1, 1)
end
if choix_sorts_27377 == 3 then
pUnit:RegisterEvent('spell3_27377', 1, 1)
end
if choix_sorts_27377 == 4 then
pUnit:RegisterEvent('spell4_27377', 1, 1)
end
end

function mob27377_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27377', math.random(1500, 3000), 1)
end

function mob27377_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27377_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27377_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27377, 1, 'mob27377_Action')
RegisterUnitEvent(27377, 2, 'mob27377_Leave')
RegisterUnitEvent(27377, 3, 'mob27377_Kill')
RegisterUnitEvent(27377, 4, 'mob27377_Die')
